package com.hospital.ssm.service.serviceimpl;

import com.hospital.ssm.mapper.DoctorQualMapper;
import com.hospital.ssm.model.DoctorType;
import com.hospital.ssm.service.DoctorQualService;
import com.hospital.ssm.vo.DoctorQualAndType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DoctorQualServiceimpl implements DoctorQualService {
    @Autowired
    private DoctorQualMapper doctorQualMapper;

    @Override
    public List<DoctorQualAndType> getAll(Integer dtId){
        List<DoctorQualAndType> all = null;
        try {
            all = doctorQualMapper.getAll(dtId);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return all;
    }

    @Override
    public int delete(Integer id) throws Exception {
        return doctorQualMapper.delete(id);
    }

    @Override
    public int insert(DoctorType doctorType) throws Exception {
        return doctorQualMapper.insert(doctorType);
    }

    @Override
    public int update(DoctorType doctorType) throws Exception {
        return doctorQualMapper.update(doctorType);
    }

    @Override
    public int updatedtStatusu(Integer id) throws Exception {
        return doctorQualMapper.updatedtStatusu(id);
    }

    @Override
    public int updatedtStatusn(Integer id) throws Exception {
        return doctorQualMapper.updatedtStatusn(id);
    }
}
